#ifndef H_RCGD_CMD_H
#define H_RCGD_CMD_H

extern int parsing_command( char *s );
//extern void set4GValue(unsigned int v);
extern void task_cmd();
extern int cmd_ResetRCV(int argc, char **argv);

extern int i_cmd_ResetRCV;
extern int b_RstF1000c;

#define issue_f1000c_cold_start()	do{ b_RstF1000c=1; } while(0)
#define MAX_CMD_SIZE 	100

typedef struct
{
	int gps;
	int ant;
	int holdover;
	int efc;
	int ocxo;
	int inore_range;
}IntensionalStatus_;
extern IntensionalStatus_ frc_error;

typedef struct
{
	int holdover_warn1; //86400*14
	int holdover_warn2;	//86400*7
	int ant_fault;		//3600
}stAlarmRange_;

extern stAlarmRange_ alm_range;


extern void DisplayHandler();
extern int bDisplayLog;
extern int iDisplayLogStep;
extern void DisplayLogHandler();
extern void dbg_printf(char *fmt,...);


typedef struct
{
	int running;
	int step;
	int cnt;

	double ro;
	double ro_prev;

	double diff;
	double diff_prev;
	double ddiff;

	double diff_sum;
	double ddiff_sum;

	double diff_sol;
	double ddiff_sol;

	double diff_sol2nd;
	double ddiff_sol2nd;

	double center;
	double gain;

}_stGetGain;

extern _stGetGain st_gg ;
extern void	GetOCXOGain();

#endif

